{include file="header.html"}

<div class="page-header">
	<h6>
		系统设置
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			开通的区域
		</small>
	</h6>
</div>

<form class="form-inline" action="?app=setting&act=district_{if $id>0}edit{else}add{/if}" method="post">
<input type="hidden" name="city_id" value="{$city_id}" />
<input type="hidden" name="id" value="{$id}" />
<input type="text" class="input-medium" placeholder="名称" name="name" value="{$row->name}" /> 
<input type="text" class="input-medium" placeholder="区域编码" name="district_id" value="{$row->district_id}" /> 
<input type="text" class="input-medium" placeholder="排序" name="sort" value="{$row->sort}" />
<button type="submit" class="btn btn-info btn-sm">  



	<i class="ace-icon fa fa-pencil bigger-110"></i>{if $id>0}修改{else}添加{/if}
</button>



{if $id>0}
<a class="btn btn-sm" href="?app=setting&act=district&city_id={$city_id}">
	<i class="ace-icon fa fa-undo bigger-110"></i>返回
</a>
{/if}

<a class="btn btn-sm" href="?app=city&act=get_district_code">
	<i class="ace-icon fa fa-undo bigger-110"></i>查询区域编号
</a>


</form>

<div class="table-content">
<table id="simple-table" class="table table-striped table-bordered table-hover">
	<thead>
		<tr>
			<th>ID</th>
			<th>区域编码</th>
			<th>名称</th>
			<th>排序</th>
			<th>操作</th>
		</tr>
	</thead>

	<tbody>
		{foreach from=$rs item=row name=row}
		<tr>
			<td>{$row.id}</td>
			<td>{$row.district_id}</td>
			<td>{$row.name}</td>
			<td>{$row.sort}</td>
			<td>
				<a href="?app=setting&act=district&city_id={$city_id}&id={$row.id}">
					<button type="button" class="btn btn-xs btn-info">
					<i class="ace-icon fa fa-pencil bigger-120"></i>
				</button>
				</a>
				<a href="?app=setting&act=district_delete&city_id={$city_id}&id={$row.id}" class="delete">
					<button type="button" class="btn btn-xs btn-danger">
					<i class="ace-icon fa fa-trash-o bigger-120"></i>
				</button>
				</a>
			</td>
		</tr>
		{foreachelse}
		<tr bgcolor="white"><td colspan="13" height="50">暂无记录</td></tr>
		{/foreach}	
		
	</tbody>
</table>
</div>
<div class="mypage">
	共 {$page.num_records} 个记录  {$page.current_page} / {$page.num_pages} 页  {$page.first_page} {$page.prev} {$page.nav} {$page.next} {$page.last_page}
</div>
{include file="footer.html"}


